﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

using MongoDB.Bson.Serialization.Attributes;

namespace BusinessManagementStudio.Models.BusinessObject.Entities
{
    [BsonIgnoreExtraElements]
    public class Order : MongoEntity
    {
        public String FMCode { get; set; }
        public String ServiceOrderNo { get; set; }
        public String Location { get; set; }
        public String Description { get; set; }
        public String WorkOrderNo { get; set; }
        public String Emergency { get; set; }
        public bool HasQuotation { get; set; }
        public String QuotationNo { get; set; }
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}",
               ApplyFormatInEditMode = true)]
        public DateTime QuotationCreationDate { get; set; }
        public bool HasInvoice { get; set; }
        public String InvoiceNo { get; set; }
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}",
               ApplyFormatInEditMode = true)]
        public DateTime InvoiceCreationDate { get; set; }
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}",
               ApplyFormatInEditMode = true)]
        public DateTime CreationDate { get; set; }
        public String VendorNo { get; set; }
        public String CompanyType { get; set; }
        public String CompanyName { get; set; }
        public bool IsValid { get; set; }
    }
}